Skip to content

Makes port optional in the URL for serverless compute #2

Merged
zhouzypaul merged 3 commits intozhouzypaul:no-portfrom
jacobphillips99:main
Apr 22, 2025
Merged

Makes port optional in the URL for serverless compute #2
zhouzypaul merged 3 commits intozhouzypaul:no-portfrom
jacobphillips99:main

Conversation

@jacobphillips99
Copy link
Copy Markdown
Contributor

@jacobphillips99 jacobphillips99 commented Apr 16, 2025

Currently the implementation for hosting server-side models relies on binding to a "port" number such as 8000. However, if we want to use cloud-based compute orchestration platforms like Modal, there's no persistent port as the provider handles all the networking. We want to make the port number optional for the URL.

In auto_eval Job SQLModel, policy_server_port is cast as an integer type. In order to prevent database migration, we use -1 as a sentinel value to avoid adding the port to the URL.

See similar PR in mse-check repo: zhouzypaul/mse-check#1

@zhouzypaul
Copy link
Copy Markdown
Owner

Thanks for the PR!

We would also need to modify this API endpoint here to support testing the connecting without having a port:

def test_policy_server(request: PolicyServerTestRequest):

@jacobphillips99
Copy link
Copy Markdown
Contributor Author

@zhouzypaul made a helper function and updated the downstream messages!

@jacobphillips99 jacobphillips99 changed the base branch from main to no-port April 22, 2025 15:48
@zhouzypaul
Copy link
Copy Markdown
Owner

Thanks! Will merge in a branch for testing!

@zhouzypaul zhouzypaul merged commit 48bab63 into zhouzypaul:no-port Apr 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants